//
//  CityLocateCell.m
//  ZhuanZuBao
//
//  Created by 戴伟 on 2020/9/10.
//  Copyright © 2020 戴伟. All rights reserved.
//

#import "CityLocateCell.h"

@interface CityLocateCell()

@property (weak, nonatomic) IBOutlet UIButton *cityBtn;


@end

@implementation CityLocateCell

- (void)awakeFromNib {
    [super awakeFromNib];
}


+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"CityLocateCell";
    CityLocateCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:ID owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}

-(void)setCurrentCity:(NSString *)city{
    [_cityBtn setTitle:[NSString stringWithFormat:@" %@", city] forState:UIControlStateNormal];
}

@end
